import create from 'zustand'
import Web3Manager from '../libs/web3-manager';

export interface MainlayoutState {
    address:string;
    fetchAddress: () => void;
    
}
export const useMainlayoutStateStore = create<MainlayoutState>(set => ({
    address: '',
    fetchAddress: async() => {
        let address = await Web3Manager.getWalletAddress();
        set(state => ({
            address: address
        }))
    }
}))

